package com.hsc.yalebao.newui;

import android.content.Context;
import android.graphics.Bitmap.Config;
import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.hsc.yalebao.http.AppConstants;
import com.hsc.yalebao.model.AvdBaseModel;
import com.hsc.yalebao.weight.LogUtils;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.DisplayImageOptions.Builder;
import com.nostra13.universalimageloader.core.assist.ImageSize;
import java.util.ArrayList;

public class NewViewPagerAdapter extends PagerAdapter
{
  private String TAG = "-AdvViewPagerAdapter-";
  private Context context;
  private LayoutInflater inflater;
  private ImageSize mImageSize;
  private DisplayImageOptions options;
  public ArrayList<AvdBaseModel> pic_ids;

  public NewViewPagerAdapter(ArrayList<AvdBaseModel> paramArrayList, Context paramContext)
  {
    this.pic_ids = paramArrayList;
    this.context = paramContext;
    this.inflater = LayoutInflater.from(paramContext);
    this.mImageSize = new ImageSize(400, 200);
    this.options = new DisplayImageOptions.Builder().cacheInMemory(true).cacheOnDisk(true).resetViewBeforeLoading(true).showImageOnFail(0).bitmapConfig(Bitmap.Config.RGB_565).build();
  }

  public void destroyItem(ViewGroup paramViewGroup, int paramInt, Object paramObject)
  {
    paramViewGroup.removeView((View)paramObject);
  }

  public int getCount()
  {
    if (this.pic_ids == null)
      return 0;
    return this.pic_ids.size();
  }

  public int getItemPosition(Object paramObject)
  {
    return -2;
  }

  public Object instantiateItem(ViewGroup paramViewGroup, int paramInt)
  {
    View localView = this.inflater.inflate(2130903102, null);
    ImageView localImageView = (ImageView)localView.findViewById(2131100025);
    ((paramInt + 1) % this.pic_ids.size());
    AvdBaseModel localAvdBaseModel = (AvdBaseModel)this.pic_ids.get(paramInt);
    String str = AppConstants.BASE_URL_IMG + localAvdBaseModel.getImg_url();
    LogUtils.d(this.TAG, "imgUrl:" + str);
    localAvdBaseModel.getSort_id();
    switch (localAvdBaseModel.getId())
    {
    default:
    case 0:
    case 1:
    case 2:
    case 3:
    }
    while (true)
    {
      paramViewGroup.addView(localView);
      return localView;
      localImageView.setImageResource(2130837517);
      continue;
      localImageView.setImageResource(2130837518);
      continue;
      localImageView.setImageResource(2130837519);
      continue;
      localImageView.setImageResource(2130837520);
    }
  }

  public boolean isViewFromObject(View paramView, Object paramObject)
  {
    return paramView == paramObject;
  }

  public void setBannerData(ArrayList<AvdBaseModel> paramArrayList)
  {
    this.pic_ids = paramArrayList;
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.newui.NewViewPagerAdapter
 * JD-Core Version:    0.6.2
 */